﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using System.Data.Entity.Repository.Filters;

namespace Testing.UnitTests
{
    public class TestQueryable
    {
        List<TestEntity> entities;

        public TestQueryable()
        {
            entities = new List<TestEntity>{
                new TestEntity{
                    Name = "TestEntity1",
                    Active = true
                },
                new TestEntity{
                    Name = "TestEntity2",
                    Active = false
                }
            };
        }

        public IQueryable<TestEntity> GetTestEntities()
        {
            IQueryable<TestEntity> result = entities.AsQueryable();
            result = result.FilterWith<IQueryableTestFilter, TestEntity>();

            return result;
        }

        public IQueryable<TestEntity> GetTestEntitiesWithoutFilter()
        {
            IQueryable<TestEntity> result = entities.AsQueryable();

            return result;
        }
    }
}
